﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;

namespace POVRay {
    public class PhotonsMedia : Block {
        public int MaxSteps { get; set; }
        public float? Factor { get; set; }

        public PhotonsMedia(int maxSteps) {
            MaxSteps = maxSteps;
        }

        public PhotonsMedia(int maxSteps, float factor) {
            MaxSteps = maxSteps;
            Factor = factor;
        }

        public override string ToString(int level) {
            string factorSubstring = Factor.HasValue ? (", " + Factor.Value.POVRayString()) : "";
            return "media " + MaxSteps.POVRayString() + factorSubstring;
        }
    }
}
